//
//  HWGuanzhuwanjianViewCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2019/10/22.
//  Copyright © 2019 Chendaobin. All rights reserved.
//

#import "HWGuanzhuwanjianViewCell.h"

@implementation HWGuanzhuwanjianViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
        
    }
    
    return  self;
    
    
}

// 设置UI


- (void)setupUI {
    
    self.headPortraitImageView = [[UIImageView alloc]initWithFrame:CGRectMake(12, 10, 63, 63)];
    self.headPortraitImageView.image = [UIImage imageNamed:@"morenTuPenson_ico"];
    self.headPortraitImageView.layer.cornerRadius = 63/2;
    self.headPortraitImageView.layer.masksToBounds = YES;
    [self.contentView addSubview: self.headPortraitImageView];
    
    CGSize size =  [WMUtil  strName:@"18330491321_s" fontSize:[UIFont systemFontOfSize:14] boundingRectWithSize:CGSizeMake(1000, 1000)];
    
    
     self.zhanghaoLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.headPortraitImageView.right+14, 26, size.width, 13)];
     self.zhanghaoLabel.text = @"18330491321_s";
     self.zhanghaoLabel.textColor = RGB(51, 51, 51);
     self.zhanghaoLabel.font = [UIFont systemFontOfSize:14];
    // self.zhanghaoLabel.backgroundColor = [UIColor redColor];
     
     [self.contentView addSubview:self.zhanghaoLabel];
    
    self.icoIamgeView = [[UIImageView alloc]initWithFrame:CGRectMake(self.zhanghaoLabel.right+3, 24, 19, 17)];
    self.icoIamgeView.image = [UIImage imageNamed:@"imgzsdeengji"];
    
    [self.contentView addSubview:self.icoIamgeView];
    
    
   // xiaohaoLabel
    
       self.xiaohaoLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.headPortraitImageView.right+14, self.zhanghaoLabel.bottom+7, 200, 13)];
        self.xiaohaoLabel.text = @"ID:55551312";
        self.xiaohaoLabel.textColor = RGB(102 , 102 ,102);
        self.xiaohaoLabel.font = [UIFont systemFontOfSize:10];
        [self.contentView addSubview:self.xiaohaoLabel];
    
    self.quxiaoBut = [UIButton buttonWithType:UIButtonTypeCustom];
    self.quxiaoBut.frame = CGRectMake(kScreenW-73-12, 30, 73, 25);
    self.quxiaoBut.backgroundColor = blueBackgroundBT;
    self.quxiaoBut.layer.cornerRadius = 25/2;
    self.quxiaoBut.layer.masksToBounds = YES;
    self.quxiaoBut.titleLabel.font = [UIFont systemFontOfSize:13];
    [self.quxiaoBut setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    
    [self.quxiaoBut setTitle:@"取消关注" forState:UIControlStateNormal];
    [self.contentView addSubview: self.quxiaoBut];
    
  
    
    
    
     self.fengexianView = [[UIView alloc]initWithFrame:CGRectMake(0, 82, kScreenW, 1)];
     self.fengexianView.backgroundColor = RGB(232, 232, 242);
     [self.contentView addSubview:self.fengexianView];
    
}



@end
